<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="referrer" content="no-referrer" />
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <title>天气庄园</title>
  </head>
  <body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
        <a class="navbar-brand" href="{% url 'wait' %}">{% block username %}用户{% endblock %}</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              地区
            </a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
              <form method="POST" action="{% url 'nav' %}">
                {% csrf_token %}
                <input class="form-control mr-sm-2" name="nav" type="hidden" value='华北'>
                <button class="btn dropdown-item" type="submit">华北</button>
              </form>
              <form method="POST" action="{% url 'nav' %}">
                {% csrf_token %}
                <input class="form-control mr-sm-2" name="nav" type="hidden" value='东北'>
                <button class="btn dropdown-item" type="submit">东北</button>
              </form>
              <div class="dropdown-divider"></div>
              <form method="POST" action="{% url 'nav' %}">
                {% csrf_token %}
                <input class="form-control mr-sm-2" name="nav" type="hidden" value='华东'>
                <button class="btn dropdown-item" type="submit">华东</button>
              </form>
              <form method="POST" action="{% url 'nav' %}">
                {% csrf_token %}
                <input class="form-control mr-sm-2" name="nav" type="hidden" value='华中'>
                <button class="btn dropdown-item" type="submit">华中</button>
              </form>
              <form method="POST" action="{% url 'nav' %}">
                {% csrf_token %}
                <input class="form-control mr-sm-2" name="nav" type="hidden" value='华南'>
                <button class="btn dropdown-item" type="submit">华南</button>
              </form>
              <div class="dropdown-divider"></div>
              <form method="POST" action="{% url 'nav' %}">
                {% csrf_token %}
                <input class="form-control mr-sm-2" name="nav" type="hidden" value='西北'>
                <button class="btn dropdown-item" type="submit">西北</button>
              </form>
              <form method="POST" action="{% url 'nav' %}">
                {% csrf_token %}
                <input class="form-control mr-sm-2" name="nav" type="hidden" value='西南'>
                <button class="btn dropdown-item" type="submit">西南</button>
              </form>
              <div class="dropdown-divider"></div>
              <form method="POST" action="{% url 'nav' %}">
                {% csrf_token %}
                <input class="form-control mr-sm-2" name="nav" type="hidden" value='港澳台'>
                <button class="btn dropdown-item" type="submit">港澳台</button>
              </form>
            </div>
          </li>
          <li style="margin-top:10px">
            <a href="{% url 'login' %}" style="margin-left:10px;margin-top:15px;color:powderblue">退出登录</a>
          </li>
<!--          <button type="button" class="btn btn-link" style="margin-left:10px;margin-top:5px;color:powderblue">退出登录</button>-->
        </ul>

        <form class="form-inline my-2 my-lg-0" method="POST" action="{% url 'city' %}">
            {% csrf_token %}
            <input class="form-control mr-sm-2" name="city" type="search" placeholder="请输入你想查询的城市" aria-label="Search">
            <button class="btn btn btn-outline-light my-2 my-sm-0" type="submit">搜索</button>
        </form>
        </div>
    </nav>
    <br>
    <div class="container">
        {% block content %}
        {% endblock %}
    </div>
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
  </body>
</html>
